import request from "@/axios/request";
export function changeUsername(data) {
  return request({
    method: "POST",
    url: "login/changeUsername",
    data,
  });
}

export function changeEmail(data) {
  return request({
    method: "POST",
    url: "/login/changeEmail",
    data,
  });
}

export function getCodeByTel(data) {
  return request({
    method: "POST",
    url: "/login/getCodeByTel",
    data,
  });
}


export function changeTel(data) {
  return request({
    method: "POST",
    url: "/login/changeTel",
    data,
  });
}

export function upload(data) {
  return request({
    method: "POST",
    url: "/index/upload",
    data,
  });
}

// 初次设置密码
export function setPassword(data) {
  return request({
    method: "POST",
    url: "/login/setPassword",
    data,
  });
}

// 设置密码
export function setPasswordAgin(data) {
  return request({
    method: "POST",
    url: "/login/changePassword",
    data,
  });
}

export function company_info(data) {
  return request({
    method: "POST",
    url: "/staginguser/company_info",
    data,
  });
}

export function company_info_add(data) {
  return request({
    method: "POST",
    url: "/staginguser/company_info_add",
    data,
  });
}


export function company_info_pz(data) {
  return request({
    method: "POST",
    url: "/staginguser/company_info_pz",
    data,
  });
}
export function member_buy_list(data) {
  return request({
    method: "POST",
    url: "/Staginguser/member_buy_list",
    data,
  });
}

export function tabulation(data) {
  return request({
    method: "POST",
    url: "/integrals/tabulation",
    data,
  });
}


export function exchange_use_yes(data) {
  return request({
    method: "POST",
    url: "/Staginguser/exchange_use_yes",
    data,
  });

}

export function exchange_use_not(data) {
  return request({
    method: "POST",
    url: "/Staginguser/exchange_use_not",
    data,
  });

}



export function exchange_list(data) {
  return request({
    method: "POST",
    url: "/Staginguser/exchange_list",
    data,
  });
}

export function exchange_add(data) {
  return request({
    method: "POST",
    url: "/Staginguser/exchange_add",
    data,
  });
}

export function levelscomplete(data) {
  return request({
    method: "POST",
    url: "/levels/complete",
    data,
  });
}

export function todaySign(data) {
  return request({
    method: "POST",
    url: "/integrals/todaySign",
    data,
  });
}

export function integralsisEnabled(data) {
  return request({
    method: "POST",
    url: "/integrals/isEnabled",
    data,
  });
}
export function integralsallocation(data) {
  return request({
    method: "POST",
    url: "/integrals/allocation",
    data,
  });
}

export function collectlist(data) {
  return request({
    method: "POST",
    url: "/collect/list",
    data,
  });
}

export function collectcancel(data) {
  return request({
    method: "POST",
    url: "/collect/cancel",
    data,
  });
}

export function Hospitaladd_contacts(data) {
  return request({
    method: "POST",
    url: "/Hospital/add_contacts",
    data,
  });
}

export function bxsubscriptionts_submit(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/ts_submit",
    data,
  });
}

export function bxsubscriptionadd(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/add",
    data,
  });
}

export function bxsubscriptionlist(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/list",
    data,
  });
}

export function bxsubscriptiondel(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/del",
    data,
  });
}





export function bxsubscriptionallocation(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/allocation",
    data,
  });
}

export function bxsubscriptionts_submit_list(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/ts_submit_list",
    data,
  });
}

export function Inforeleasetags(data) {
  return request({
    method: "POST",
    url: "/Inforelease/tags",
    data,
  });
}

export function Inforeleasedetail(data) {
  return request({
    method: "POST",
    url: "/Inforelease/detail",
    data,
  });
}


export function Inforeleaseget_serial_number(data) {
  return request({
    method: "POST",
    url: "/Inforelease/get_serial_number",
    data,
  });
}


export function Inforeleaseedit(data) {
  return request({
    method: "POST",
    url: "/Inforelease/edit",
    data,
  });
}


export function Inforeleasedel(data) {
  return request({
    method: "POST",
    url: "/Inforelease/del",
    data,
  });
}



export function Inforeleaseadd(data) {
  return request({
    method: "POST",
    url: "/Inforelease/add",
    data,
  });
}


export function Inforeleaselist(data) {
  return request({
    method: "POST",
    url: "/Inforelease/list",
    data,
  });
}


export function searchgetInfomation(data) {
  return request({
    method: "POST",
    url: "/search/getInfomation",
    data,
  });
}

export function bxsubscriptionsubscription_search(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/subscription_search",
    data,
  });
}

export function bxsubscriptionsubscription_search_list(data) {
  return request({
    method: "POST",
    url: "/bxsubscription/subscription_search_list",
    data,
  });
}





export const getDate = (timestamp)=>{
  let date = new Date(timestamp * 1000); // 注意：JavaScript的Date对象需要毫秒为单位的时间戳，因此我们需要乘以1000  
  
  let year = date.getFullYear();  
  let month = date.getMonth() + 1; // getMonth() 是从0开始的，所以需要+1  
  let day = date.getDate();  
    
  let hours = date.getHours();  
  let minutes = date.getMinutes();  
  let seconds = date.getSeconds();  
    
  // 如果需要补零  
  month = month < 10 ? '0' + month : month;  
  day = day < 10 ? '0' + day : day;  
  hours = hours < 10 ? '0' + hours : hours;  
  minutes = minutes < 10 ? '0' + minutes : minutes;  
  seconds = seconds < 10 ? '0' + seconds : seconds;  
    
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}

// 客服信息
export function Staginguserindex_kf_info(data) { 
  return request({
    method: "POST",
    url: "/Staginguser/index_kf_info",
    data,
  });
}
// 工作简报
export function Staginguserindex_briefing(data) {
  return request({
    method: "POST",
    url: "/Staginguser/index_briefing",
    data,
  });
}
// 首页图表项目处理状态
export function Staginguserindex_schedule(data) {
  return request({
    method: "POST",
    url: "/Staginguser/index_schedule",
    data,
  });
}
// 首页图表标讯收藏数
export function Staginguserindex_collect(data) {
  return request({
    method: "POST",
    url: "/Staginguser/index_collect",
    data,
  });
}
// 首页常用功能添加
export function Staginguserindex_use_add(data) {
  return request({
    method: "POST",
    url: "/Staginguser/index_use_add",
    data,
  });
}
// 首页常用功能列表
export function Staginguserindex_use_list(data) {
  return request({
    method: "POST",
    url: "/Staginguser/index_use_list",
    data,
  });
}
// 注册邀请积分密钥
export function Staginguserinvitation_key(data) {
  return request({
    method: "POST",
    url: "/Staginguser/invitation_key",
    data,
  });
}
